
package bis;

import java.text.ParseException;
import java.util.logging.Level;
import java.util.logging.Logger;

public class FLUtility {

    public static String GetNowTime() {
        java.util.Date nowdate = new java.util.Date();
        java.text.SimpleDateFormat ss = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String orderdate = ss.format(nowdate);
        return orderdate;
    }
    public static String GetSimpleFormatTime(String time)
    {
        java.text.SimpleDateFormat s1 = new java.text.SimpleDateFormat("yyyyMMdd");
        java.text.SimpleDateFormat s2 = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            return s2.format(s1.parse(time));
        } catch (ParseException ex) {
            Logger.getLogger(FLUtility.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }
        public static String GetImSimpleFormatTime(String time)
    {
        java.text.SimpleDateFormat s2 = new java.text.SimpleDateFormat("yyyyMMdd");
        java.text.SimpleDateFormat s1 = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            return s2.format(s1.parse(time));
        } catch (ParseException ex) {
            Logger.getLogger(FLUtility.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }
}
